<template>
  <div class="detail-layout-container">
    <el-container>
      <el-header class="header">
        <div class="header-content">
          <span class="header-title">
            <slot name="header-title">详情页面</slot>
          </span>
          <div class="button-group">
            <slot name="header-buttons"></slot>
          </div>
        </div>
      </el-header>
      <el-main class="main">
        <slot></slot>
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
defineOptions({
  name: 'DetailLayout'
})
</script>

<style lang="scss" scoped>
.detail-layout-container {
  background-color: #f0f4ff;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  :deep(.el-container) {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
  }

  .header {
    height: 60px;
    display: flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 0;
    margin: 0;
    flex-shrink: 0;

    .header-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
      width: 100%;

      .header-title {
        font-size: 20px;
      }

      .button-group {
        display: flex;
        gap: 10px;
      }
    }
  }

  .main {
    display: flex;
    justify-content: center;
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }
}
</style> 